import { goToLoginPage } from '@/framework/utils/toPage'

function toast(mes){
	uni.showToast({
		title: mes,
		mask: true,
		icon: 'none'
	})
}


export function showError(code,message){
	switch (code) {
	    case 401:
	        toast('未授权，请先登录')
			// goToLoginPage()
	        break;
	    default:
	        if(code != 200 && message?.length > 0){
	        	 toast(message)
	        } 
	}
}